/*
package cloud.xlh.infrastructure.file.minio.config;

import io.minio.MinioClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

*/
/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2022/11/27 17:48
 * @ Description:
 *//*

@Slf4j
@Configuration
@EnableConfigurationProperties(MinIOProperties.class)
public class MinIOConfiguration {

    */
/**
     * 初始化minio配置
     *
     * @param :
     * @return: void
     * @date : 2020/8/16 20:56
     *//*

    @Bean
    public MinioClient minioClient(MinIOProperties minIOProperties) {
         MinioClient minioClient = null;
        try {
            minioClient = new MinioClient(minIOProperties.getUrl(), minIOProperties.getAccessKey(),
                    minIOProperties.getSecretKey());
            createBucket(minioClient , minIOProperties.getBucketName());
        } catch (Exception e) {
            e.printStackTrace();
            log.error("初始化minio配置异常: 【{}】", e.fillInStackTrace());
        }
        return minioClient;
    }

    public static void createBucket(MinioClient minioClient , String bucketName) throws Exception {
        boolean isExist = minioClient.bucketExists(bucketName);
        if (!isExist) {
            minioClient.makeBucket(bucketName);
        }
    }
}
*/
